<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link type="text/css" href="estilo/general.css" rel="stylesheet"  />
<link type="text/css" href="estilo/details.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Lobster&subset=latin' rel='stylesheet' type='text/css' />
<script type="text/javascript" src="js/jquery-latest.js"></script>
<script type="text/javascript" src="js/jquery.galletas.js"></script>
<script type="text/javascript">
$(document).ready(function(){
		window.print();
		window.close();
});
</script>
<?php
$id 	= $_GET["id"];
$sort 	= $_GET["sort"];
$d 		= $_GET["dir"];
$cri 	= $_GET["search"];
require_once("db_conect.php");

$qry  = "select libro_comentario.por, libro.titulo, libro.autor, libro_comentario.id, ";
$qry .= "libro.year, libro.version , libro_comentario.comentario, libro_comentario.perla " ;
$qry .= "from `libro` join `libro_comentario` on libro.id = libro_comentario.idlibro ";
$qry .= "where libro_comentario.id=$id";

$res = mysql_query($qry,$conexion) or die(mysql_error());

$row = mysql_fetch_assoc($res);
foreach($row as $campo => $valor) {
	$set = "\$".$campo."='".$valor."';";
	eval($set);	
}
mysql_free_result($res);

$qry = "select * from libro";
$res = mysql_query($qry,$conexion) or die(mysql_error());
//$row2 = mysql_fetch_assoc($res);
$can = mysql_num_rows($res);
$lon = strlen($can);

?>
<title>bibliotecaprieto-<?php echo $titulo ?></title>
</head>
<body>
<div id="contenido">
<div id="bienvenida" class="wufoo" style="margin:0 auto; width:95%;">
<table border="0" width="100%">
	<tr>
       	<td valign="top">
        <div style="border:1px solid #CCC; background-color:#f0f0f0; padding:10px;">
        <div style="width:50%; float:left;"><label class="desc">Titulo: </label><span style="width:100%"><?php echo $titulo ?></span></div><div><label class="desc">Autor: </label><?php echo $autor ?></div>
        <div style="width:50%; float:left;"><label class="desc">A&ntilde;o: </label><?php echo $year ?></div>
        <div><label class="desc">Editorial: </label><?php echo $version ?></div>
        </div>
        <div class="desc"><label class="desc">Perla Literaria:</label></div>
        <div style="border:1px solid #ccc;"><textarea cols="60" rows="8" style="width:98%; min-height:100px; border:0; padding:5px;font-style:italic; font-size:1.4em;"><?php echo $perla ?></textarea></div>
        <div style="border:1px solid #CCC; background-color:#f0f0f0; padding:5px; margin:5px 0px 5px 0px;"><label class="desc">Comentado por: </label><?php echo $por ?></div>
        <div style="border:1px solid #ccc; min-height:200px; padding:5px;"><?php echo $comentario ?></div>
    	</td>
    </tr>
</table>
</div>        
</div>
</body>
</html>